package com.car.loan.project.xr.util.vo;

import com.car.loan.project.xr.util.bo.business.CustomerAddBo;
import com.car.loan.project.xr.util.vo.LoanDetailVo.LoanBaseInfoVo;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import javax.validation.constraints.Min;
import lombok.Data;

/**
 * @author huangding
 * @date 2020/2/15 17:27
 */
@Data
public class BusinessDetailVo {

    @ApiModelProperty(value = "用户信息", required = true)
    private CustomerAddBo customerInfo;

    @ApiModelProperty("业务基本信息")
    private LoanBaseInfoVo loanBaseInfo;

    @ApiModelProperty("业务数据")
    private LoanInfo loanInfo;

    @ApiModelProperty("车辆信息")
    private CarInfo carInfo;


    @Data
    public static class CarInfo {


        @ApiModelProperty(value = "车辆品牌(银行)", required = true)
        private String bankCarBrand;

        @ApiModelProperty(value = "车辆型号(银行)", required = true)
        private String bankCarType;

        @ApiModelProperty(value = "发动机号", required = true)
        private String engineNo;

        @ApiModelProperty(value = "车架号", required = true)
        private String frameNo;


        @ApiModelProperty(value = "车身颜色", required = true)
        private String color;


        @ApiModelProperty(value = "开票单位", required = true)
        private String invoiceUnit;

        @ApiModelProperty(value = "开票日期yyyy-mm-dd", required = true)
        private String invoiceDate;

        @ApiModelProperty(value = "开票金额", required = true)
        private Double invoicePrice;


        @ApiModelProperty(value = "登记车主", required = true)
        private String registOwner;

        @ApiModelProperty("首次登记日期")
        private String firstRegistDate;

        @ApiModelProperty("本次登记日期")
        private String registDate;

        @ApiModelProperty("车牌号码")
        private String plateNo;
    }


    @Data
    public static class LoanInfo {

        @ApiModelProperty("融资银行")
        private String bankName;


        @ApiModelProperty(value = "分期金额，单位元", required = true)
        private Double installmentAmount;

        @ApiModelProperty(value = "执行费率，百分比", required = true)
        private Double rate;

        @ApiModelProperty(value = "融资金额", required = true)
        private Double financingAmount;


        @ApiModelProperty(value = "期数", required = true)
        private Long term;

        @ApiModelProperty(value = "放贷日期", required = true)
        private String lendDate;

        /**
         * 还款卡号
         */
        @ApiModelProperty(value = "还款卡号", required = true)
        private String repayCardNo;

        /**
         * 扣款卡号
         */
        @ApiModelProperty(value = "扣款卡号", required = true)
        private String deductionCardNo;


        /**
         * 首期还款日期
         */
        @ApiModelProperty(value = "首期账单日日期")
        private String firstRepayDate;


        @ApiModelProperty(value = "每月利息", required = true)
        @Min(1)
        private BigDecimal monthRepayInterest;

        @ApiModelProperty(value = "每月本金", required = true)
        @Min(1)
        private BigDecimal monthRepayPrincipal;

        @ApiModelProperty(value = "首月利息", required = true)
        @Min(1)
        private BigDecimal firstRepayInterest;

        @ApiModelProperty(value = "首月本金", required = true)
        @Min(1)
        private BigDecimal firstRepayPrincipal;

        @ApiModelProperty(value = "末月利息", required = true)
        @Min(1)
        private BigDecimal lastRepayInterest;

        @ApiModelProperty(value = "末月本金", required = true)
        @Min(1)
        private BigDecimal lastRepayPrincipal;

    }
}
